import { buildService, openBuildService } from "../../helper/service";


// 值类型为String或Object,String为url(method),Object同axios(config)参数支持相同,data和params只能为对象类型
const settings = {
  //获取账号列表
  getAccountList: {
    url: "/api/v1/user/user/get_comp_user_lists",
    method: "post"
  },
  // 获取单位下部门本级及下级用户列表
  getDeptUserList: {
    url: "/api/v1/user/user/get_dept_and_sub_user_list",
    method: "post"
  },
  //人员-删除
  delUser: {
    url: 'adminc/v1/system_manage/p_sys_user/del_user',
    method: 'delete'
  },
  // 人员列表-移除
  deleteJobUser: {
    url: '/adminc/v1/organization_manage/p_job_user/delete_job_user',
    method: 'delete'
  },
  //冻结|启用账号
  frostAccount: {
    url: "/api/v1/user/user/chg_status",
    method: "post"
  },
  //导入账号
  uploadAccount: {
    url: "/api/v1/user/user/create_user_import",
    method: "post"
  },
  //获取岗位下拉框列表
  getJob: {
    url: "/api/v1/user/user/get_user_job_name",
    method: "post"
  },
  //获取用户详情
  getUserDetail: {
    url: "/api/v1/user/user/get_detail",
    method: "post"
  },
  //新增账号
  addAccount: {
    url: "/api/v1/user/user/add_user",
    method: "post"
  },
  //修改账号
  editAccount: {
    url: "/api/v1/user/user/edit_user",
    method: "post"
  },
  // 判断手机号是否被使用
  checkPhoneUsed: {
    url: "/api/v1/user/user/check_phone",
    method: "get"
  },
  // 用户申请列表
  // getUserList: {
  //   url: "/api/v1/org/o_comp_user/user_list",
  //   method: "get"
  // },
  // 用户申请列表(新)
  getUserList: {
    url: "/adminc/v2/o_org_v2/get_join_org_list",
    method: "get"
  },
  // //用户申请列表-同意/驳回 
  // judgePassOrFail: {
  //   url: '/api/v1/org/o_comp_user/pass_or_not',
  //   method: 'post'
  // },
  //用户申请列表-同意/驳回 (改)
  judgePassOrFail: {
    url: '/adminc/v2/o_org_v2/examine_join_org',
    method: 'post'
  },
};
const platSettings = {
  // 生成二维码
  getUserQRCode: {
    url: '/api/v1/user/qrcode',
    method: 'post',
    responseType: 'blob'
  },
  //部门,单位二维码
  getQrcode: {
    url: '/api/v1/user/org_qrcode',
    method: 'post',
    responseType: 'blob'
  },
}
export default { ...openBuildService(settings), ...buildService(platSettings) };
